/**
 * 
 */
package net.mikoo.seals.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author huangxm
 *
 */
public class PropertiesUtil {
	
	
	public static String getString(String key,String propFile){
		
		InputStream inStream = PropertiesUtil.class.getClassLoader().getResourceAsStream(propFile);  
		Properties prop = new Properties();   
		try {
			prop.load(inStream);
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			
			try {
				inStream.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		
		
		Object obj = prop.get(key);
		if(obj != null ){
			
			return obj.toString();
		}
		
		return "";
	}
	
	
}
